import request from '@/utils/request'

//登录
export function passLogin(data) {
  return request({
    url: '/api/h5/passLogin',
    method: 'post',
    data: data,
    isService:true
  })
}

//用户详情
export function userDetails() {
  return request({
    url: '/api/h5/user/details',
    method: 'get',
    useToken: true,
    isService:true
  })
}
//查询简单信息
export function userSimple(query) {
  return request({
    url: '/api/h5/im/simple',
    method: 'get',
    params: query,
    useToken: true,
    isService:true
  })
}

//查询群信息
export function groupInfo(query) {
  return request({
    url: '/api/h5/im/groupInfo',
    method: 'get',
    params: query,
    useToken: true,
    isService:true
  })
}

/**
 * 通用文件上传(图片)
 * @param data
 */
export function uploadImage(data) {
  return request({
    url: '/api/h5/common/uploadImage',
    method: 'post',
    data: data,
    useToken: true,
    isService:true
  })
}
/**
 * 通用文件上传（文件）
 * @param data
 */
export function uploadFile(data) {
  return request({
    url: '/api/h5/common/uploadFile',
    method: 'post',
    data: data,
    useToken: true,
    isService:true
  })
}
